-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Mixed period cannot be displayed with ValueError #12615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I would change the exception that |
6da8f8d
to
6b3d2a1
Compare
Current coverage is
|
OK, changed to raise |
@@ -627,6 +628,11 @@ cdef ndarray[int64_t] localize_dt64arr_to_period(ndarray[int64_t] stamps, | |||
_DIFFERENT_FREQ = "Input has different freq={1} from Period(freq={0})" | |||
_DIFFERENT_FREQ_INDEX = "Input has different freq={1} from PeriodIndex(freq={0})" | |||
|
|||
|
|||
class IncompatibleFrequency(ValueError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its helpful you can import this into pandas.tseries.common
. can do that in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, added.
lgtm. let me know if you want to change the import now or later. |
@@ -44,7 +44,8 @@ Enhancements | |||
API changes | |||
~~~~~~~~~~~ | |||
|
|||
|
|||
- ``Period`` and ``PeriodIndex`` now raises ``IncompatibleFrequency`` error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, usually just make these 1 line as the formatter will wrap it (and I think create a weird space otherwise)
ef04e9f
to
c4737ae
Compare
lgtm. ping on green |
thanks @sinhrks |
git diff upstream/master | flake8 --diff